﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using HsTec.DigitalPlatform.DataAccess;

namespace HsTec.DigitalPlatform.Business
{
    public class UserInfoManager
    {
        UserInfoRepository userinforepository = new UserInfoRepository();

        public void Add(UserInfo userinfo)
        {
            userinforepository.Add(userinfo);
        }

        public void Delete(UserInfo userinfo)
        {
            userinforepository.Delete(userinfo);
        }

        public void Save()
        {
            userinforepository.Save();
        }

        public UserInfo GetUserInfoByID(int id)
        {
            return userinforepository.GetUserInfoByID(id);
        }

        public IQueryable<UserInfo> FindALLUserInfo()
        {
            return userinforepository.FindALLUserInfo();
        }

        public bool CheckUserInfo(string userName, string passWord)
        {
            return userinforepository.CheckUserInfo(userName, passWord);
        }

        public IQueryable<UserInfo> PageInfo(int page, int rp, string sortname, string sortorder)
        {
            return userinforepository.PageInfo(page, rp, sortname, sortorder);
        }

        public int GetAllCount()
        {
            return userinforepository.GetAllCount();
        }
    }
}
